



<div class="x-body">
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
            <input class="layui-input"  autocomplete="off" placeholder="开始日" name="date1"  value="{:input('date1')}" id="start">
            <input class="layui-input"  autocomplete="off" placeholder="截止日" name="date2"  value="{:input('date2')}" id="end">
            <input type="text" name="username"  placeholder="请输入用户名" autocomplete="off" value="{:input('username')}"  class="layui-input">
            <input type="text" name="mobile"  placeholder="请输入手机号" autocomplete="off"  value="{:input('mobile')}" class="layui-input">
            <button class="layui-btn"  id="search"  url="{:url('memberlist')}"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </form>
    </div>
    <xblock>
        <!--<button class="layui-btn layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>批量删除</button>-->
        <button class="layui-btn" ><ob_link><a  href="{:url('memberAdd')}" style="color: white"> 添加 </a></ob_link></button>
        <!--<ob_link> <button class="layui-btn export" url="{:url('exportMemberList')}"> 导 出</button></ob_link>-->
        <span class="x-right" style="line-height:40px">共有数据：{$list['count']} 条</span>
    </xblock>
    <table class="layui-table x-admin">
        <thead>
        <tr>
            <!--<th>-->
            <!--<div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>-->
            <!--</th>-->
            <th>序号</th>
            <th>UID</th>
            <th>用户名</th>
            <th>手机</th>
            <th>注册时间</th>
            <th>是否锁定</th>
            <th>操作</th>
        </thead>
        {notempty name='list.list'}
        <tbody>
        {volist name='list.list' id='vo' key="k"}
        <tr>
            <!--<td>-->
            <!--<div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='2'><i class="layui-icon">&#xe605;</i></div>-->
            <!--</td>-->
            <td>{$k}</td>
            <td>{$vo.id}</td>
            <td>
                {$vo.username}

            </td>
            <td>
                {$vo.mobile|default='未绑定'}
            </td>
            <td>{$vo.create_time|date='Y-m-d H:i:s',###}</td>

            <td><a class="ajax-get" href="javascript:;">
                {if condition="$vo['is_black'] eq 0"}
                <ob_link><a class="ajax-get" href="{:url('update_info', array('id' => $vo['id'], 'is_black' =>1))}">  <span class='badge bg-green'>正常</span></a></ob_link>

                {else/}
                <ob_link><a class="ajax-get" href="{:url('update_info', array('id' => $vo['id'], 'is_black' => 0))}">  <span class='badge bg-red'>已锁</span></a></ob_link>

                {/if}
            </a></td>
            <!--<td class="td-status">-->
            <!--<span class="layui-btn layui-btn-normal layui-btn-mini">已启用</span></td>-->
            <td class="td-manage">
                <!--<a onclick="member_stop(this,'10001')" href="javascript:;"  title="启用">-->
                <!--<i class="layui-icon">&#xe601;</i>-->
                <!--</a>-->


                <ob_link><a title="编辑"  href="{:url('memberEdit', array('id' => $vo['id']))}" href="javascript:;">
                    <i class="layui-icon">&#xe642;</i>
                </a></ob_link>
                <ob_link><a title="发帖"  href="{:url('bbs/articleAdd', array('user_id' => $vo['id']))}" href="javascript:;">
                    <i class="layui-icon">&#xe654;</i>
                </a></ob_link>



            </td>
        </tr>
        {/volist}
        {else/}
        <tbody><tr class="odd"><td colspan="12" class="text-center" valign="top">{:config('empty_list_describe')}</td></tr></tbody>
        {/notempty}

        </tbody>
    </table>
    <div class="page">
        {notempty name='list.list'}   {$list['list']->render()}{/notempty}
    </div>

</div>
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });
    });

    /*用户-停用*/
    function member_stop(obj,id){
        layer.confirm('确认要停用吗？',function(index){

            if($(obj).attr('title')=='启用'){

                //发异步把用户状态进行更改
                $(obj).attr('title','停用')
                $(obj).find('i').html('&#xe62f;');

                $(obj).parents("tr").find(".td-status").find('span').addClass('layui-btn-disabled').html('已停用');
                layer.msg('已停用!',{icon: 5,time:1000});

            }else{
                $(obj).attr('title','启用')
                $(obj).find('i').html('&#xe601;');

                $(obj).parents("tr").find(".td-status").find('span').removeClass('layui-btn-disabled').html('已启用');
                layer.msg('已启用!',{icon: 5,time:1000});
            }

        });
    }

    /*用户-删除*/
    function member_del(obj,id){
        layer.confirm('确认要删除吗？',function(index){
            //发异步删除数据
            $(obj).parents("tr").remove();
            layer.msg('已删除!',{icon:1,time:1000});
        });
    }



    function delAll (argument) {

        var data = tableCheck.getData();

        layer.confirm('确认要删除吗？'+data,function(index){
            //捉到所有被选中的，发异步进行删除
            layer.msg('删除成功', {icon: 1});
            $(".layui-form-checked").not('.header').parents('tr').remove();
        });
    }

    //导出功能
    $(".export").click(function(){

        window.location.href = searchFormUrl($(".export"));
    });
</script>
<script>var _hmt = _hmt || []; (function() {
    var hm = document.createElement("script");
    hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(hm, s);
})();</script>
</body>

</html>